Skip to content

Make CRM counters available for route_perf test#2477

Merged
vaibhavhd merged 4 commits intosonic-net:masterfrom
vaibhavhd:CRM_counters_fix
Nov 6, 2020
Merged

Make CRM counters available for route_perf test#2477
vaibhavhd merged 4 commits intosonic-net:masterfrom
vaibhavhd:CRM_counters_fix

Conversation

@vaibhavhd
Copy link
Contributor

@vaibhavhd vaibhavhd commented Nov 6, 2020

Description of PR

Summary: Add a fixture to make CRM counters available for test_route_perf
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

A regression has been noticed in test_route_perf after #2461 - in some platforms when the CRM counters are not ready, the test fails with:

>       used_routes_count = duthost.get_crm_resources().get("main_resources").get(route_tag).get("used")
E       AttributeError: 'NoneType' object has no attribute 'get'

NUM_NEIGHS = 8

How did you do it?

Reduce the CRM polling limit at the start of the test from 300s to 1s. Reset this limit at the end of the test.

How did you verify/test it?

Tested a newly warm-rebooted device (no CRM counters), the CRM counters get set due to reduced polling interval (1s) and the test passes:

------------------------------------------------------------------------ live log call -------------------------------------------------------------------------
07:21:19 INFO test_route_perf.py:test_perf_add_remove_routes:203: IP route utilization before test start: Used: 6475, Available: 67253, Test count: 10000
07:22:18 INFO test_route_perf.py:test_perf_add_remove_routes:218: Time to set 10000 ipv4 routes is 26.57 seconds.
07:23:06 INFO test_route_perf.py:test_perf_add_remove_routes:222: Time to del 10000 ipv4 routes is 27.34 seconds.
PASSED                                                                                                                                                   [ 50%]
route/test_route_perf.py::test_perf_add_remove_routes[6]
------------------------------------------------------------------------ live log setup ------------------------------------------------------------------------
07:23:28 INFO __init__.py:set_default:49: Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
07:23:28 INFO __init__.py:check_test_completeness:128: Test has no defined levels. Continue without test completeness checks
07:23:30 INFO __init__.py:loganalyzer:32: Add start marker into DUT syslog
07:23:31 INFO __init__.py:loganalyzer:34: Load config and analyze log
------------------------------------------------------------------------ live log call -------------------------------------------------------------------------
07:23:33 INFO test_route_perf.py:test_perf_add_remove_routes:203: IP route utilization before test start: Used: 6475, Available: 1717, Test count: 1717
07:23:57 INFO test_route_perf.py:test_perf_add_remove_routes:218: Time to set 1717 ipv6 routes is 5.15 seconds.
07:24:09 INFO test_route_perf.py:test_perf_add_remove_routes:222: Time to del 1717 ipv6 routes is 4.90 seconds.
PASSED                                                                                                                                                   [100%]    

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@vaibhavhd vaibhavhd requested a review from a team November 6, 2020 07:31
@lgtm-com
Copy link

lgtm-com bot commented Nov 6, 2020

This pull request introduces 1 alert when merging c56651f into 51fb3bb - view on LGTM.com

new alerts:

  • 1 for Unused import

@vaibhavhd vaibhavhd merged commit df7620f into sonic-net:master Nov 6, 2020
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…nic-net#12669)

utilities:
* 8cb6124 2022-11-09 | [armhf][sonic-installer] Fix the issue of sonic-installer list after set-default and cleanup (sonic-net#2479) [Marty Y. Lok]
* b2d50f4 2022-11-06 | [GCU] Fix JsonPointerFilter bug (sonic-net#2477) (HEAD -> 202205, github/202205) [jingwenxie]
* 927daea 2022-11-08 | Do not configure physical attributes on port channels in portconfig (sonic-net#2456) [Stephen Sun]
* dbe8f2d 2022-11-02 | Fix sudo sfputil show error-status on a multiasic platform issue (sonic-net#2373) [Marty Y. Lok]
* fff5f67 2022-11-04 | [show] vnet advertised-route command (sonic-net#2390) (sonic-net#2478) [siqbal1986]
* 9d921a7 2022-11-04 | Fix exception in adding mirror_session when gre_type is absent (sonic-net#2476) [bingwang-ms]
* 0bbe54a 2022-11-03 | [show] vnet endpoint [ip/ipv6] command (sonic-net#2342) (sonic-net#2421) (sonic-net#2474) [siqbal1986]
* b1b3661 2022-11-03 | show vnet routes all. (sonic-net#2341) (sonic-net#2472) [siqbal1986]

swss:
* e208c87 2022-11-08 | swss: Fixing race condition for rif counters (sonic-net#2488) (HEAD -> 202205) [Suman Kumar]

platform-common:
* 83f77cc 2022-11-08 | Fix issue: rounding float value for txpower and rxpower (sonic-net#320) (HEAD -> 202205) [Junchao-Mellanox]
* 169ee25 2022-11-04 | Fix issue: copper cable should not display DOM information (sonic-net#318) [Junchao-Mellanox]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants